<template>
    <div>

      <el-table
        :data="itemList"
        border
        style="width: 100%"
      >
        <el-table-column
          type="index"
          width="50"
          align="center"
          fixed
        />

        <el-table-column
          label="头像"
          width="75"
        >
          <template slot-scope="{row}">
            <img :src="row.avatar" style="width: 50px;height: 50px"/>
          </template>
        </el-table-column>
        <el-table-column
          prop="nickname"
          label="姓名"
          width="180"
        />
        <el-table-column
          prop="phone"
          width="110"
          label="电话号码"
        />
        <el-table-column
          prop="address"
          label="收货地址"
        />
        <el-table-column
          label="状态"
          width="80"
        >
        <template slot-scope="{row}">
          <span>{{row.orderStatus|watchStatus}}</span>
        </template>
        </el-table-column>
      </el-table>
    </div>
</template>

<script>
  export default {
    name: 'history',
    props:['itemList'],
    filters:{
      watchStatus(val){
        if (val==0){
          return '未成交'
        }else if (val==1){
          return '已成交'
        }
      }
    }
  }
</script>

<style scoped>

</style>
